package top.lywivan.mm.controller;

import top.lywivan.mm.entity.Result;
import top.lywivan.mm.pojo.Dict;
import top.lywivan.mm.service.DictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/dict")
public class DictController {

    @Autowired
    private DictService dictService;

    @GetMapping("/findListByType")
    public Result findDictListByType(Integer typeId){
        List<Dict> list = dictService.findDictListByType(typeId);
        return new Result(true,"查询字典完成",list);
    }
}
